﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WF_Business;

public partial class Map_EstateZDList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindGrid();
        }
    }

    private void BindGrid()
    {
        var dtTemp = GetData();
        gv.DataSource = dtTemp;
        gv.RecordCount = dtTemp.Rows.Count;
        gv.DataBind();
    }

    private static DataTable GetData()
    {
        var dtTemp = new DataTable();
        var strSql = " select id, iid, input_index, ssxm, zfsj, mj, sheng, zl, sfqm, sfyjd, yxj, sfqdxy, gsmj, bcxyje, tdyt, shi, qu, tdlx, jdsj, qmsj, bdclx, sfzfwc, qdxysj from ut_gzzdcq_bdcxx_zdjbxx order by iid desc";
        SysParams.OAConnection().RunSql(strSql, out dtTemp);
        return dtTemp;
    }

    /// <summary>
    /// 绑定数据
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void gv_OnLoadData(object sender, EventArgs e)
    {
        BindGrid();
    }
}